package com.android.fragmentdemo
import android.net.Uri
import android.os.Bundle
import com.hengfoxwolf.commonbase.base.BaseActivity2
import com.android.fragmentdemo.databinding.ActivityWindowManagerShowViewBinding
import com.android.fragmentdemo.glideoptions.GlideApp
import com.android.fragmentdemo.util.WindowManagerUtil
import com.bumptech.glide.load.engine.DiskCacheStrategy
import java.io.BufferedInputStream
import java.io.FileInputStream

class WindowManagerShowViewActivity :
    BaseActivity2<ActivityWindowManagerShowViewBinding>(ActivityWindowManagerShowViewBinding::inflate) {


    override fun init(savedInstanceState: Bundle?) {

        mBinding.btnShowTop.setOnClickListener {

            //WindowManagerUtil.showContentView(resources.getString(R.string.txt_test_compose_hgv))
            WindowManagerUtil.showContentView(resources.getString(R.string.txt_show_content))
        }

        val gifPath = "file:///android_asset/square_loading.gif"
        //val inputStream = resources.openRawResource(R.raw.ship_ocean)
        GlideApp
            .with(this@WindowManagerShowViewActivity)
            .asGif()
            .diskCacheStrategy(DiskCacheStrategy.RESOURCE)
            .load(gifPath)
            .into(mBinding.ivLoadVideo)

    }

}